package pl.edu.pw.stud.ltrzaska.validator;

import org.apache.commons.vfs.FileObject;
import org.apache.commons.vfs.FileSystemException;
import org.apache.log4j.Logger;

import pl.edu.pw.stud.ltrzaska.logic.ValidationContext;
import pl.edu.pw.stud.ltrzaska.policy.entity.Directory;
import pl.edu.pw.stud.ltrzaska.policy.entity.File;
import pl.edu.pw.stud.ltrzaska.policy.entity.FilesystemObject;
import pl.edu.pw.stud.ltrzaska.validator.iface.IFilesystemObjectValidator;

public class SystemPropertyValidator implements IFilesystemObjectValidator {
	private final static Logger LOGGER = Logger.getLogger(SystemPropertyValidator.class);
	
	// TODO write specific existence validation for Group and Sequence
	@Override
	public boolean validate(FilesystemObject policyFsObj, FileObject virtualFsObj, ValidationContext vc)
			throws FileSystemException {
		
		LOGGER.debug(".validate() for FilesystemObject");
		return true;
	}
	public boolean validate(File f, FileObject parentVirtualFsObj) {
		LOGGER.debug(".validate() for File");
		return true;
	}
	public boolean validate(Directory d, FileObject parentVirtualFsObj) {
		LOGGER.debug(".validate() for Dir");
		return true;
	}
	@Override
	public boolean canValidate(FilesystemObject pfo, FileObject vfo) {
		// TODO Auto-generated method stub
		return false;
	}
}
